package pos.domain;

public class DisciplineImpl implements Discipline {

	private String id;
	private String name;
//	private Category category;

	public DisciplineImpl() {

	}

	public DisciplineImpl(String id, String name) {
		super();
		this.id = id;
		this.name = name;
//		this.category = category;
	}

	public String getId() {
		return id;
	}

	public String getName() {
		return name;
	}

//	public Category getCategory() {
//		return category;
//	}

	public void setId(String id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

//	public void setCategory(Category category) {
//		this.category = category;
//	}

	public int hashCode() {
		final int prime = 31;
		int result = 1;
//		result = prime * result
//				+ ((category == null) ? 0 : category.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DisciplineImpl other = (DisciplineImpl) obj;
//		if (category == null) {
//			if (other.category != null)
//				return false;
//		} else if (!category.equals(other.category))
//			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}

}
